package com.spring;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public enum CompanyEnum {

    SF("顺丰速运", "1001"),
    YTO("圆通速递", "1002"),
    STO("申通物流", "1003"),
    YD("韵达快运", "1004"),
    YZPY("中国邮政", "1005");

    private String company; // 公司名称
    private String code; // 公司编码

    private CompanyEnum(String company, String code) {
        this.company = company;
        this.code = code;
    }

    public String getCompany() {
        return company;
    }
    public void setCompany(String company) {
        this.company = company;
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public String toString() {
        return "CompanyEnum{" +
                "company='" + company + '\'' +
                ", code='" + code + '\'' +
                '}';
    }

    public static  void  returnsListDatas() {
        CompanyEnum[] values = CompanyEnum.values();
        for ( CompanyEnum vs : values){
            System.out.println(vs);
        }
    }

}
